//
//  PublicSpaceScene.m
//  SCRAP_ObjC
//
//  Created by Capstone Design Fall 2010 on 10/18/10.
//  Copyright 2010 Thunderwear. All rights reserved.
//

#import "PublicSpaceScene.h"
#import "BackgroundLayer.h"
#import "iPadSession.h"

static iPadSession *gses;

@implementation PublicSpaceScene

+(id) scene
{
	PublicSpaceScene *scene = [PublicSpaceScene node];	
	return scene;
}

+(id) sceneWithRoundLimit:(int) limit
{
	PublicSpaceScene *scene = (PublicSpaceScene*)[CCLayer node];
	BackgroundLayer *blayer = [BackgroundLayer initWithRoundLimit:limit];
	[blayer setPicker:gses];
	[scene addChild:blayer];
	scene.isTouchEnabled = TRUE;
	return scene;
}

+(id) sceneWithScoreLimit:(int) limit
{
	PublicSpaceScene *scene = (PublicSpaceScene*)[CCLayer node];
	BackgroundLayer *blayer = [BackgroundLayer initWithScoreLimit:limit];
	[blayer setPicker:gses];
	[scene addChild:blayer];
	scene.isTouchEnabled = TRUE;
	return scene;
}

-(id) init
{
	if((self =[super init]))
	{
		//BackgroundLayer* background_layer = [BackgroundLayer node];
		//[self addChild: background_layer];
		
		self.isTouchEnabled = TRUE;	
	}

	return self;
}

-(void) dealloc
{
	[super dealloc];
}

-(void) setPicker:(iPadSession*)sesh
{
	gses = [sesh retain];
	//gses.gameDelegate = self;

}
@end
